package com.ssmTest.service.impl;

import com.ssmTest.domian.User;
import com.ssmTest.mapper.UserMapper;
import com.ssmTest.service.UserService;

import org.apache.ibatis.io.Resources;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;
import org.aspectj.lang.annotation.Before;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.io.IOException;
import java.io.InputStream;
import java.util.List;

@Service("userService")
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper mapper;


    @Override
    public User login(User user) {
        User loginUser = null;
        try {
            loginUser = mapper.login(user);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return loginUser;
    }
}
